/**
 * 
 */
var interval;
var week = ["일", "월", "화", "수", "목", "금", "토"];
function intervalinit()
{
	document.getElementById('btnstart').onclick = timeron;
	document.getElementById('btnstop').onclick = timeroff;
}
function timeron()
{
	interval = setInterval(clock, 1000);
}
function timeroff()
{
	clearInterval(interval);
}
function clock()
{
	var cnt;
//	alert("시작");
	var now = new Date();
//	alert("생성");
	cnt = now.getFullYear() + "년";
	cnt += (now.getMonth()+1) + "월";
	cnt += now.getDate() + "일 (";
	cnt += week[now.getDay()] + "요일)";
	cnt += now.getHours() + ":";
	cnt += now.getMinutes() + ":";
	cnt += now.getSeconds();
	var r = document.getElementById('result');
	r.innerHTML = cnt;
}
